A local site mirrors the contents of a web site on a remote server. You define a local site by naming it and specifying a local root folder on your hard disk. Any subfolders of the root folder are also within the site. Dreamweaver uses the local root folder to locate all links specified as site-root-relative URLs.
If you connect a local site to a remote site, Dreamweaver maintains identical directory structures to ensure that links and references are not accidentally broken. If directories do not exist on the site where files are being transferred, Dreamweaver automatically creates them.
Until you save a document within a defined local site, site-root-relative links do not work. In all dialog boxes where you link a file to the current document, you can choose to define the path as site-root-relative, document-relative, or absolute.
If you move a document or folder out of a defined local site, site-root-relative links stop working. You can move folders containing linked files to a different defined local site, and site-root-relative links continue to work as long as the folder structure branching from the root is the same as the original site. See About relative and absolute paths.
To define a local site:
1 | Choose File > Open Site > Edit Sites. |
To switch sites, choose File > Open Site. When working on different web sites, define a different site for each one. | |
2 | Enter a value for Site Name. |
Site Name is what appears on the File > Open Site submenu. | |
3 | Enter a path in Local Root Folder. |
Local Root Folder specifies the folder on your hard drive where you want to store files for this site. The Local Root Folder is the local equivalent of the site root folder on the remote site. Dreamweaver creates all site-root-relative links relative to the local root folder. Turn on the Default Site option if you want new documents saved in this location by default. | |
4 | Enter values for the remaining options only if you want connect the local site to a remote site. If you have not yet established a remote server, leave these options empty. |
![]() |
Root URL is the part of the URL that appears before every file and directory on your site; for example, http://www.mysite.com/. This value is used by the Link Checker to determine whether absolute path links refer to files within your site or to files on external sites. See Checking links between documents. |
![]() |
FTP Host is the hostname of your web server; for example, ftp.sirius.com or www.mysite.com. |
![]() |
Host Directory specifies the directory on the remote site where documents visible to the public are stored, also known as the site root; for example, public_html/ or www/public/docs/. |
![]() |
Login and Password are your login name and password on the server. If you turn off the Save option, you'll be prompted for a password when you connect to the remote site. |
![]() |
Firewall determines whether the Host and Port information you entered in Site FTP preferences should be used when you connect to the remote site (see Site FTP preferences). Leave this option deselected if you are not connecting through a firewall. |
Once you complete these options, choose Connect to access the remote server. | |
![]() |